﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RoleList.ascx.cs" Inherits="DMS.Web.Common.Controls.UserRoleList" %>
<asp:DataGrid ID="dgRoleList" runat="server" AutoGenerateColumns="false" Width="100%"
    CssClass="dg_borderstyle" OnItemDataBound="dgRoleList_ItemDataBound">
    <HeaderStyle HorizontalAlign="Center" />
    <ItemStyle CssClass="dg_itemstyle" />
    <AlternatingItemStyle CssClass="dg_alternatingitemstyle" />
    <Columns>
        <asp:TemplateColumn HeaderText="多选" Visible="false">
            <ItemStyle Width="30px" HorizontalAlign="Center" />
            <HeaderTemplate>
                <a id="selectAllLink" href="javascript:" title="点击“全选”或“取消全选”" onclick="javascrpt:SelectAll(this, 'chkSelector');"
                    statue="false" style="cursor: hand;">全选</a>
            </HeaderTemplate>
            <ItemTemplate>
                <input type="checkbox" id="chkSelector" name="chkSelector" value="<%#Eval("ID") %>"
                    onchange="javascript:UpdateSelectedItem(this, '<%=hidSelectedItem.ClientID %>');" />
            </ItemTemplate>
        </asp:TemplateColumn>
        <asp:TemplateColumn HeaderText="单选" Visible="false">
            <ItemStyle Width="30px" HorizontalAlign="Center" />
            <HeaderTemplate>
                选择
            </HeaderTemplate>
            <ItemTemplate>
                <input type="radio" id="radSelector" name="radSelector" value="<%#Eval("ID") %>"
                    onchange="javascript:UpdateSelectedItem(this, '<%=hidSelectedItem.ClientID %>');"
                    onclick="javascript:try{Clear();AddItem('<%#Eval("Name") %>','<Actor Type=\'<%#Eval("ActorType") %>\' ID=\'<%#Eval("ID") %>\' Name=\'<%#Eval("Name") %>\' RoleType=\'<%#Eval("Type") %>\' />');}catch(e){}" />
            </ItemTemplate>
        </asp:TemplateColumn>
        <asp:TemplateColumn HeaderText="名称">
            <ItemStyle Width="150px" />
            <ItemTemplate>
                <div style="overflow: hidden; text-overflow: ellipsis; width: 150px;">
                    <nobr>
                        <%#Eval("Name") %>
                    </nobr>
                </div>
            </ItemTemplate>
        </asp:TemplateColumn>
        <asp:TemplateColumn HeaderText="描述">
            <ItemStyle Width="150px" />
            <ItemTemplate>
                <%#Eval("Description")%>
            </ItemTemplate>
        </asp:TemplateColumn>
        <asp:TemplateColumn HeaderText="操作">
            <ItemTemplate>
                <nobr>
                </nobr>
            </ItemTemplate>
        </asp:TemplateColumn>
        <asp:TemplateColumn HeaderText="操作">
            <ItemStyle HorizontalAlign="Center" />
            <ItemTemplate>
                <nobr>
                    <a id="lkSelectBtn" runat="server" href="javascript:">选择</a>
                </nobr>
            </ItemTemplate>
        </asp:TemplateColumn>
    </Columns>
</asp:DataGrid>
<asp:ListBox ID="lbGridColState" runat="server" Visible="false">
    <asp:ListItem Value="SelectAction">0</asp:ListItem>
    <asp:ListItem Value="SingleSelector">1</asp:ListItem>
    <asp:ListItem Value="Management">4</asp:ListItem>
    <asp:ListItem Value="MutilSelector">5</asp:ListItem>
</asp:ListBox>
<div id="dvEmpty" class="EmptyMsg" runat="server" visible="false">
    没有查询到相应的角色信息。
</div>
<asp:HiddenField ID="hidSelectedItem" runat="server" />
